<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><{$title}>-地区</title>
<!-- CSS样式 -->
<link href="css/table.css" rel="stylesheet" type="text/css"/>
<link href="../favicon.ico" type="image/x-icon" rel="icon" />
<link href="../favicon.ico" type="image/x-icon" rel="shortcut icon" />
<!-- 提示框-->
<link href="../js/Prompt/skin/ymPrompt.css" rel="stylesheet" id='skin' type="text/css"/>
<script language="javascript" charset="utf-8" type="text/javascript" src="../js/Prompt/ymPrompt.js"></script>
<!-- 复选框-->
<script language="javascript" src="js/checkbox.js" type="text/javascript"></script>
<!-- JQuery-->
<script language="javascript" charset="utf-8" src="../js/jquery.min.js" type="text/javascript"></script>
<{if $mod eq "edit"}>
<!-- 验证-->
<script language="javascript" src="js/proving.js" type="text/javascript"></script>
<{else}>
<!-- AJAX操作js -->
<script language="javascript" src="js/ajax.do.js" type="text/javascript"></script>
<{/if}>
</head>
<body>
<{if $mod eq "edit"}>
<!-- 编辑 -->
<div  class="divmain">
		<form id="info_cata_add" name="info_cata_add" method="post" action="area.php?mod=edit&pid=<{$pid}>&level=<{$level}>&page=<{$page}>" onsubmit="return areainput(this);">
			<table width="100%" border="0"  cellpadding="1" cellspacing="1">
				<tr>
					<th colspan="2" ><{$areaTitle}> <span class="jiacu"><{$titleAct}></span></th>
				</tr>
				<tr>
					<td width="25%" class="td6" >名称：</td>
					<td width="75%" class="td5">
					<input type="text"
                    onclick="this.value=this.value.replace(/[^\u4E00-\u9FA5]/g,'');"
                    onkeyup="this.value=this.value.replace(/[^\u4E00-\u9FA5]/g,'');"
                    onMouseDown="this.value=this.value.replace(/[^\u4E00-\u9FA5]/g,'');"
                    name="classname"  value="<{if $one.infoid ne 0}><{$one.title}><{/if}>" class="put"/>
					<span class="xinghao">*</span><span class="gray">只支持中文</span>
					</td>
				</tr>

				<tr>
					<td class="td6" >显示：</td>
					<td class="td5">
					<input type="radio" name="number" class="radios" value="0" <{if $one.infoid ne 0}><{if $one.ishow eq "0" || $one.ishow ne "0"}>checked="checked"<{/if}><{else}>checked="checked"<{/if}> />不显示
					<input type="radio" name="number" class="radios" value="1" <{if $one.infoid ne 0}><{if $one.ishow eq "1"}>checked="checked"<{/if}><{/if}> />已显示
					</td>
				</tr>
				<tr>
					<td class="td6">排序：</td>
					<td class="td5">
					<input type="text" onkeyup="this.value=this.value.replace(/\D/g,'');" name="orderid"  value="<{if $one.infoid ne 0}><{$one.orderid}><{/if}>" class="updata_put"/>
					<span class="gray">提示:数字越大排得越前,默认0,省市有置顶的为默认区域</span>
					</td>
				</tr>

				<tr>
					<td colspan="2">
						<input type="hidden" name="act" id="act" value="change" />
						<input type="hidden" name="actId" id="infoid" value="<{if $one.infoid ne 0}><{$one.infoid}><{/if}>" />
						<input type="submit" name="okay" id="appent" value=" 保 存 " class="btn" />
						<input type="button" value=" 返 回 " class="btn" onclick="javascript:window.location.href='<{$Returnfpage}>';" />
					</td>
				</tr>
			</table>
		</form>
	</div>
<{else}>
<!-- 区域列表 -->
<div  class="divmain">
 <form id="info_cata" name="info_cata" method="post" action="<{$fpage}>&pid=<{$pid}>&level=<{$level}>&page=<{$page}>" >
<table width="100%" border="0"  cellpadding="1" cellspacing="1">
  <tr>
  	<th><input type="button" name="addone" value=" 添加 " class="btn" onClick="javascript:window.location.href='area.php?mod=edit&act=add&pid=<{$pid}>&level=<{$level}>&page=<{$page}>';"/>
	</th>
    <th colspan="6"><{$info_cata_name}> <span class="jiacu">管理</span>
    </th>
    <th><{if $level ne "1"}><input type="button" name="pgups" value=" |<< " class="btn" onClick="javascript:window.location.href='<{$fpage}>&pid=<{$fid}>&level=<{$level-1}>';"/><{else}>&nbsp;<{/if}></th>
  </tr>
  <tr>
    <td width="8%" class="td2">
		<input type="checkbox" id="chkAll" onclick="return CheckAll(this.form);" value="checkbox"/>
    </td>
    <td width="10%" class="td2" >序号</td>
    <td width="32%" class="td2">区域名称</td>
    <td width="10%" class="td2" >排序</td>
    <td width="10%" class="td2" >显示与否</td>
    <td width="10%" class="td2" >区域子类</td>
    <td width="10%" class="td2" >操作</td>
    <td width="10%" class="td2" >查看子类</td>
  </tr>
  <{foreach from=$area_arr item=area}>
  <tr class="out" onMouseOver="this.className='over'" onMouseOut="this.className='out'">
    <td class="td4">
     <!-- 数据id，用于批量更新 -->
    <input type="hidden" name="all[]" value="<{$area.id}>"/>
    <input type="checkbox" name="del[]" value="<{$area.id}>"/>
    </td>
    <td class="td4"><{$area.pageid}></td>
    <td class="td8">
    &nbsp;&nbsp;
    <a title="<{$area.title}>" href="#" onclick="javascript:window.location.href='area.php?mod=edit&act=update&pid=<{$area.id}>&level=<{$level}>&page=<{$page}>';" >
    &nbsp;<{$area.title}>
    <!-- 置顶提示 -->
    <{if $area.pageid eq 1 && $area.parentid eq 0}><img src="images/btn/top.gif"/><{/if}>
    </a>
    </td>
    <td class="td4">
	<input type="text" name="rep[]" onkeyup="this.value=this.value.replace(/\D/g,'')" class="updata_put" value="<{$area.orderid}>"/>
	</td>

	<td class="td4">
<{if $area.ishow eq "0"}>
<!-- 不显示 -->
<img src="./images/btn/ishow_no.png" title="不显示" onclick="javascript:window.location.href='area.php?mod=ishow&ishowId=1&infoid=<{$area.id}>';">
<{elseif $area.ishow eq "1"}>
<!-- 显示 -->
<img src="./images/btn/ishow_ok.png" title="已显示" onclick="javascript:window.location.href='area.php?mod=ishow&ishowId=0&infoid=<{$area.id}>';">
<{else}>
<!-- 不显示 -->
<img src="./images/btn/ishow_no.png" title="不显示" onclick="javascript:window.location.href='area.php?mod=ishow&ishowId=1&infoid=<{$area.id}>';">
<{/if}>
    </td>
	<td class="td4">
    <span class="nums"><{$area.subclassnum}></span>
    </td>
    <td class="td4">
    <img src="images/btn/trun.gif" title="修改"
    onclick="javascript:window.location.href='area.php?mod=edit&act=update&pid=<{$area.id}>&level=<{$level}>&page=<{$page}>';"/>
    <!--<img src="images/btn/del.gif" title="删除" onclick="return DelOneArea('<{$area.id}>');"/>-->
    </td>
    <td class="td4">
    <{if $level lt 3}>
    <input type="button" value=" >>| " class="btn" onClick="javascript:window.location.href='<{$fpage}>&pid=<{$area.id}>&level=<{$level+1}>';"/>
    <{else}>&nbsp;<{/if}>
    </td>
  </tr>
  <{foreachelse}>
  <tr class="out" onmouseover="this.className='over'" onmouseout="this.className='out'">
  	<td colspan="13" class="td4">
  		<img src="images/msg.gif"/>&nbsp;<span class="xinghao">您还没有添加，请点击左上角</span><span class="remindbtn">添加</span>
		</td>
  	</tr>
  <{/foreach}>
  <tr>
    <td class="td2" >
    	<!--<input type="submit" name="delall"  value=" X " class="delbtn" onClick="return confirm('您确认删除当前区域吗?')" />-->
    	&nbsp;
	</td>
    <td class="td2" colspan="2">
    	&nbsp;
	</td>
	<td class="td2" colspan="1"><{if $recordcount ne ""}><input type="submit" name="replace" value=" 批量更新 " class="btn" /><{else}>&nbsp;<{/if}></td>
	<td colspan="3" class="td2" >&nbsp;</td>
	<td class="td2">
	&nbsp;
	</td>
  </tr>
  <tr>
    <td colspan="8" class="td7">
          <span class="nums"><{if $recordcount ne ""}><{$recordcount}><{else}>0<{/if}></span>条
            <{if $page ne "" && $pagecount ne "" && $page lt $pagecount}><{$page}><{else}>1<{/if}>/<{if $pagecount ne ""}><{$pagecount}><{else}>1<{/if}>页
            <a href="<{$fpage}>&pid=<{$pid}>&level=<{$level}>&page=1">首页</a>
			<{if $page gt 1}><a href="<{$fpage}>&pid=<{$pid}>&level=<{$level}>&page=<{$prepage}>">上页</a><{else}><a>上页</a><{/if}>
             <a>
            <{foreach from=$numpage item=curr_id}>
            <{if $page eq $curr_id}>
            <a class="xinghao"><{$curr_id}></a>
            <{else}><a href="<{$fpage}>&pid=<{$pid}>&level=<{$level}>&page=<{$curr_id}>"><{$curr_id}></a>
            <{/if}>
            <{/foreach}>
            </a>
            <{if $page lt $pagecount}><a href="<{$fpage}>&pid=<{$pid}>&level=<{$level}>&page=<{$nexpage}>">下页</a><{else}><a>下页</a><{/if}>
			<a href="<{$fpage}>&pid=<{$pid}>&level=<{$level}>&page=<{if $pagecount ne ''}><{$pagecount}><{else}>1<{/if}>">尾页</a>
           
    </td>
  </tr>
</table>
</form>
</div>

<{/if}>
</body>
</html>